home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 4,101 to 4,200
/
aol-file-protocol-4400-4101-to-4200.zip
/
AOLDLs
/
ADV - Articles & Misc
/
Manual for ProDev DDT8_DDT16
/
DDT.MANUAL.bxy
/
DDT.Manual
/
CHAPTER.9
(
.txt
)
< prev
next >
Wrap
AppleWorks Document
|
1993-08-05
|
13KB
|
248 lines
O=====<====<====<====<====<====<====<====<====<====<====<====<====<====<====<===
O=====<====<====<====<====<====<====<====<====<====<====<====<====<====<====<===
$C826 DS 1 ;BIT 7=1= normal entry, bit 7=0 do RTS afte
CHAPTER 9
CUSTOMIZING
CUSTOMIZING THE {DDT8}
MEMORY LOCATIONS FOR DDT8
n = Slot number of ProDev DDT card
$Cn00 = Initialize and enter the ProDev DDT.2
$Cn03 = Initialize the ProDev DDT and do an RTS.*
$Cn24 = Warmstart entry into ProDev DDT.
LOCATIONS INSIDE ProDev DDT RAM.
Where your program's registers are saved.
$C811 = Accumulator
$C813 = X index
$C815 = Y index
$C817 = Stack Pointer
$C81A = Processor Status$
$C81B = Program counter (Low byte)#
$C81C = Program counter (Hi byte)
$C81D = Bank number
ProDev DDT8 FLAGS
$C81E DS 1 ;"Text screen save": 0= off, bit 7=1= on?
$C81F DS 1 ;CPU type: 0= 6502, bit 7=1= 65C02, bit 6=1= 65802D
$C820 DS 1 ;I/O mode: 0= normal, bit 7=1= serial, bit 6=1= printer6
$C821 DS 1 ;bit 7=1= don't send DDT output to screen
EYou can use the following "start up" program to initialize the above K
IFLAGS to your preference. Simply modify the program to provide the setup
you desire.
******************************************************************D
* ProDev DDT8 setup program *D
* *D
* replace "n" with the slot number of the ProDev DDT8 card. *D
******************************************************************
DDT8IN2 EQU $Cn03 ;Enter here to initialize the DDT8A
CARDOFF EQU $CFFF ;Disable the peripheral cards 2K ROMs.,
TEXTSAVE EQU $C81E ;Text screen save?
CPUTYPE EQU $C81F ;CPU, $00=6502, $80=65C02, $40=65802D
IOMODE EQU $C820 ;I/O, $00=Screen, $80=Serial, $40=PrinterA
DISPLAY EQU $C821 ;DDT8 display On/Off switch, $80 = Off
INITDDT8 BIT CARDOFF ;Disable all peripheral cards 2K ROMs7
JSR DDT8IN2 ;Initialize DDT8 and return.-
BIT $Cn00 ;Enable DDT8 card.
* Set the Text screen save mode0
LDA #0 ;Turn screen save off(
STA TEXTSAVE ;Set the flag
* Select the CPU)
LDA #$80 ;CPU type 6502(
STA CPUTYPE ;Set the flag
* Select serial I/O.
STA IOMODE ;Set for serial I/O
* Turn the display off. This will prevent the ProDev DDT fromD
* changing the screen display of the target program, which is nice
* during serial I/O operation.,
STA DISPLAY ;Turn display off
* The following two lines have the same effect as leaving the#
* ProDev DDT via the "*" command.B
LDA #$DC ;Ignore interrupts & write protect DDT89
STA $C80C ;Talk directly to the VIA chip
RTS ;Setup routine finished
SUBROUTINES FOR "TRACE WITH SUBROUTINE" COMMAND
"Bcc" - refers to any valid branch instruction.
TEST A BYTE IN MEMORY
TESTMEM LDA $ADDRESS ;get contents of location to test.
CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTS ;return to ProDev DDT
TEST THE ACCUMULATOR
TESTACC CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTS ;return to ProDev DDT
TEST THE X INDEX
TESTX CPX #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program
LEAVE RTS ;return to ProDev DDT
TEST THE Y INDEX
TESTY CPY #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTS ;return to ProDev DDT
TEST THE STACK POINTER
TESTSP TSX ;transfer the stack pointer to X index
INX ;?
INX ;correct for the JSR to your subroutine.
CPX #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTS ;return to ProDev DDT
TEST THE LOW BYTE OF THE PROGRAM COUNTER
TESTPC CLC ;clear CARRY flag9
LDA $C816 ;get low byte of pc from DDT8 RAM.
CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTS ;return to ProDev DDT
TEST THE PROCESSOR STATUS REGISTER
TESTPS CLC ;clear CARRY flagC
LDA $C815 ;get the status register contents from DDT8.
CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTS ;return to ProDev DDT
CUSTOMIZING THE {DDT16}
MEMORY LOCATIONS FOR DDT16
n = Slot number of ProDev DDT card
$Cn00 = Initialize and enter the ProDev DDT.2
$Cn04 = Initialize the ProDev DDT and do an RTS.*
$Cn08 = Warmstart entry into ProDev DDT.
LOCATIONS INSIDE ProDev DDT16 RAM.
--- Where your program's registers are saved ---
$C811 DS 2 ;A
$C813 DS 2 ;X
$C815 DS 2 ;Y
$C817 DS 2 ;S
$C819 DS 2 ;D
$C81B DS 1 ;B
$C81C DS 1 ;M
$C81D DS 1 ;Q
$C81E DS 1 ;P
$C81F DS 1 ;PC low byte
$C820 DS 1 ;PC hi byte'
$C821 DS 1 ;PBR Program Bank Register
--- DDT16 flags ---
$C822 DS 1 ;"Text screen save": 0= off, bit 7=1= on?
$C823 DS 1 ;CPU type: 0= 6502, bit 7=1= 65C02, bit 6=1= 65816D
$C824 DS 1 ;I/O mode: 0= normal, bit 7=1= serial, bit 6=1= printer6
$C825 DS 1 ;bit 7=1= don't send DDT output to screenB
$C826 DS 1 ;BIT 7=1= normal entry, bit 7=0 do RTS after DDT init
EYou can use the following "start up" program to initialize the above K
IFLAGS to your preference. Simply modify the program to provide the setup
you desire.
******************************************************************D
* ProDev DDT16 setup program *D
* *D
* replace "n" with the slot number of the ProDev DDT card. *D
* Call in emulation mode. *D
******************************************************************
DDT16IN EQU $Cn04 ;Enter here to initialize the DDT16A
CARDOFF EQU $CFFF ;Disable the peripheral cards 2K ROMs.,
TEXTSAVE EQU $C822 ;Text screen save?
CPUTYPE EQU $C823 ;CPU, $00=6502, $80=65C02, $40=65816D
IOMODE EQU $C824 ;I/O, $00=Screen, $80=Serial, $40=Printer@
DISPLAY EQU $C825 ;DDT display On/Off switch, $80 = Off
INITDDT BIT CARDOFF ;Disable all peripheral cards 2K ROMs6
JSR DDT16IN ;Initialize DDT and return.,
BIT $Cn00 ;Enable DDT card.
* Set the "Text screen save" mode0
STZ TEXTSAVE ;Turn screen save off
* Select the CPU*
LDA #$80 ;CPU type 65C02(
STA CPUTYPE ;Set the flag
* Select serial I/O.
STA IOMODE ;Set for serial I/O
* Turn the display off. This will prevent the ProDev DDT from6
* changing the screen display of the target program.,
STA DISPLAY ;Turn display off
* The following two lines have the same effect as leaving the$
* ProDev DDT via the "**" command.B
LDA #$DC ;Ignore interrupts & write protect DDT89
STA $C80C ;Talk directly to the VIA chip2
RTS ;Setup routine finished
SUBROUTINES FOR "TRACE WITH SUBROUTINE" COMMAND
"Bcc" - refers to any valid branch instruction.
GThe DDT16 calls "TS" routines in 16 bit native mode with the following
register contents:
A = targets Accumulator
X = target's X
Y = target's Y:
P = target's status with I=1 to prevent interrupts.
D = $0000
B = $E0
HThe direct page register "D" & data bank register "B" must be preserved
by your subroutine.
TEST A BYTE IN MEMORY
TESTMEM LDA $ADDRESS ;get contents of location to test.
CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT
TEST THE ACCUMULATOR
TESTACC CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT
TEST THE X INDEX
TESTX CPX #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT
TEST THE Y INDEX
TESTY CPY #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT
TEST THE STACK POINTER
TESTSP TSX ;transfer the stack pointer to X index
INX ;?
INX ;correct for the JSR to your subroutine.
CPX #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT
TEST THE LOW BYTE OF THE PROGRAM COUNTER
TESTPC CLC ;clear CARRY flag8
LDA $C81F ;get low byte of pc from DDT RAM.
CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT
TEST THE PROCESSOR STATUS REGISTER
TESTPS CLC ;clear CARRY flagB
LDA $C81E ;get the status register contents from DDT.
CMP #$value ;compare to some valueB
Bcc STOP ;the condition was met so stop the program@
CLC ;condition not met, clear the CARRY flag$
BCC LEAVE ; and leave.?
STOP SEC ;set the CARRY flag to stop the program-
LEAVE RTL ;return to ProDev DDT